1. Technical Field
This disclosure generally relates to computer systems, and more specifically relates to database systems.
2. Background Art
Database systems have been developed that allow a computer to store a large amount of information in a way that allows a user to search for and retrieve specific information in the database. For example, an insurance company may have a database that includes all of its policy holders and their current account information, including payment history, premium amount, policy number, policy type, exclusions to coverage, etc. A database system allows the insurance company to retrieve the account information for a single policy holder among the thousands and perhaps millions of policy holders in its database. Retrieval of information from a database is typically done using queries. A database query typically includes one or more predicate expressions interconnected with logical operators.
Database compression has been known for some time as a way to reduce the size of a table that is not often used. In the prior art, if compression is performed, it is performed on an entire database table. Once a table is compressed, it cannot be queried until it is uncompressed. If the data in the table is then needed, the entire table must be uncompressed, then a query may be executed to access data in the table. The cost in processor overhead of compressing and uncompressing a database table can be significant, especially for large tables. For this reason, compression/uncompression schemes have typically been limited to applications when the likelihood of needing data that has been compressed is low.
The first related application referenced above provides a way to partially compress a portion of a database table without compressing all of the database table. Portions that may be compressed include columns, parts of columns, and rows. When a database table has one or more compressed portions, the issue now arises regarding how to deal with the compressed portions. For example, one suitable way to handle compressed portions would be to uncompress a compressed portion when the portion is touched by a query. Note, however, that a query may cause a table scan to be performed that touches all rows even though most of the rows do not satisfy the query. Uncompressing on first touch in this manner may cause uncompression of portions of the table that are not needed. Without a way to perform dynamic uncompression of portions of a partially compressed database table in an intelligent manner, the partial compression taught in the first related application will have limited value.